import { createRouter, createWebHistory } from "vue-router";
import Login from "../views/Login.vue";
import Home from "../views/Home.vue";

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: "/",
      redirect: "/login",
    },
    {
      path: "/login",
      name: "login",
      component: Login,
    },

    {
      path: "/home",
        name: "home",
      redirect:'/home/index',
      component: Home,
        children: [
            {
                path: 'index',
                name: 'index',
                component:()=>import('../views/Index.vue')
          }
      ]
    },
   
  ],
});



export default router;
